﻿/*
 * Created by SharpDevelop.
 * User: dol
 * Date: 16/6/2556
 * Time: 12:03
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.Drawing ;
using System.Windows.Forms;
using System.Collections;
using System.Collections.Generic ;
using titi.utilmouse ; 

namespace titi.MathLocation
{
	/// <summary>
	/// Description of Location.
	/// </summary>
	sealed  public class MathPoint
	{
		private titi.utilmouse.MouseMath mmath = null ;
		public MathPoint()
		{
			mmath =  new MouseMath();
		}
		
		public void MoveFormToAnimate( System.Drawing.Point a , System.Drawing.Point b ,  Form frm){
        	titi.utilmouse.MouseMath mmath  = new MouseMath();
        	List<Point> pts = 	mmath.GetPointsInLine(frm.Location,new Point(800,400));
        	//this.Text = pts.Count.ToString();
        	for(int i = 0; i < pts.Count ; i ++ ){
        	{	
        			frm.Location = pts[i];                                  	
        			System.Threading.Thread.Yield();
        	}
		}
	}
}
}